Left Termination of the query pattern p_in_2(a, g) w.r.t. the given Prolog program could not be shown:



Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof

Clauses:

p(d(e(t)), const(1)).
p(d(e(const(A))), const(0)).
p(d(e(+(X, Y))), +(DX, DY)) :- ','(p(d(e(X)), DX), p(d(e(Y)), DY)).
p(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) :- ','(p(d(e(X)), DX), p(d(e(Y)), DY)).
p(d(d(X)), DDX) :- ','(p(d(X), DX), p(d(e(DX)), DDX)).

Queries:

p(a,g).

We use the technique of [30].Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

p_in(d(d(X)), DDX) → U5(X, DDX, p_in(d(X), DX))
p_in(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U3(X, Y, DY, DX, p_in(d(e(X)), DX))
p_in(d(e(+(X, Y))), +(DX, DY)) → U1(X, Y, DX, DY, p_in(d(e(X)), DX))
p_in(d(e(const(A))), const(0)) → p_out(d(e(const(A))), const(0))
p_in(d(e(t)), const(1)) → p_out(d(e(t)), const(1))
U1(X, Y, DX, DY, p_out(d(e(X)), DX)) → U2(X, Y, DX, DY, p_in(d(e(Y)), DY))
U2(X, Y, DX, DY, p_out(d(e(Y)), DY)) → p_out(d(e(+(X, Y))), +(DX, DY))
U3(X, Y, DY, DX, p_out(d(e(X)), DX)) → U4(X, Y, DY, DX, p_in(d(e(Y)), DY))
U4(X, Y, DY, DX, p_out(d(e(Y)), DY)) → p_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U5(X, DDX, p_out(d(X), DX)) → U6(X, DDX, DX, p_in(d(e(DX)), DDX))
U6(X, DDX, DX, p_out(d(e(DX)), DDX)) → p_out(d(d(X)), DDX)

The argument filtering Pi contains the following mapping:
p_in(x1, x2)  =  p_in
d(x1)  =  d(x1)
U5(x1, x2, x3)  =  U5(x3)
e(x1)  =  e(x1)
*(x1, x2)  =  *(x1, x2)
+(x1, x2)  =  +(x1, x2)
U3(x1, x2, x3, x4, x5)  =  U3(x5)
U1(x1, x2, x3, x4, x5)  =  U1(x5)
const(x1)  =  const
0  =  0
p_out(x1, x2)  =  p_out(x1, x2)
t  =  t
1  =  1
U2(x1, x2, x3, x4, x5)  =  U2(x1, x3, x5)
U4(x1, x2, x3, x4, x5)  =  U4(x1, x4, x5)
U6(x1, x2, x3, x4)  =  U6(x1, x4)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof
  ↳ PrologToPiTRSProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

p_in(d(d(X)), DDX) → U5(X, DDX, p_in(d(X), DX))
p_in(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U3(X, Y, DY, DX, p_in(d(e(X)), DX))
p_in(d(e(+(X, Y))), +(DX, DY)) → U1(X, Y, DX, DY, p_in(d(e(X)), DX))
p_in(d(e(const(A))), const(0)) → p_out(d(e(const(A))), const(0))
p_in(d(e(t)), const(1)) → p_out(d(e(t)), const(1))
U1(X, Y, DX, DY, p_out(d(e(X)), DX)) → U2(X, Y, DX, DY, p_in(d(e(Y)), DY))
U2(X, Y, DX, DY, p_out(d(e(Y)), DY)) → p_out(d(e(+(X, Y))), +(DX, DY))
U3(X, Y, DY, DX, p_out(d(e(X)), DX)) → U4(X, Y, DY, DX, p_in(d(e(Y)), DY))
U4(X, Y, DY, DX, p_out(d(e(Y)), DY)) → p_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U5(X, DDX, p_out(d(X), DX)) → U6(X, DDX, DX, p_in(d(e(DX)), DDX))
U6(X, DDX, DX, p_out(d(e(DX)), DDX)) → p_out(d(d(X)), DDX)

The argument filtering Pi contains the following mapping:
p_in(x1, x2)  =  p_in
d(x1)  =  d(x1)
U5(x1, x2, x3)  =  U5(x3)
e(x1)  =  e(x1)
*(x1, x2)  =  *(x1, x2)
+(x1, x2)  =  +(x1, x2)
U3(x1, x2, x3, x4, x5)  =  U3(x5)
U1(x1, x2, x3, x4, x5)  =  U1(x5)
const(x1)  =  const
0  =  0
p_out(x1, x2)  =  p_out(x1, x2)
t  =  t
1  =  1
U2(x1, x2, x3, x4, x5)  =  U2(x1, x3, x5)
U4(x1, x2, x3, x4, x5)  =  U4(x1, x4, x5)
U6(x1, x2, x3, x4)  =  U6(x1, x4)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

P_IN(d(d(X)), DDX) → U51(X, DDX, p_in(d(X), DX))
P_IN(d(d(X)), DDX) → P_IN(d(X), DX)
P_IN(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U31(X, Y, DY, DX, p_in(d(e(X)), DX))
P_IN(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → P_IN(d(e(X)), DX)
P_IN(d(e(+(X, Y))), +(DX, DY)) → U11(X, Y, DX, DY, p_in(d(e(X)), DX))
P_IN(d(e(+(X, Y))), +(DX, DY)) → P_IN(d(e(X)), DX)
U11(X, Y, DX, DY, p_out(d(e(X)), DX)) → U21(X, Y, DX, DY, p_in(d(e(Y)), DY))
U11(X, Y, DX, DY, p_out(d(e(X)), DX)) → P_IN(d(e(Y)), DY)
U31(X, Y, DY, DX, p_out(d(e(X)), DX)) → U41(X, Y, DY, DX, p_in(d(e(Y)), DY))
U31(X, Y, DY, DX, p_out(d(e(X)), DX)) → P_IN(d(e(Y)), DY)
U51(X, DDX, p_out(d(X), DX)) → U61(X, DDX, DX, p_in(d(e(DX)), DDX))
U51(X, DDX, p_out(d(X), DX)) → P_IN(d(e(DX)), DDX)

The TRS R consists of the following rules:

p_in(d(d(X)), DDX) → U5(X, DDX, p_in(d(X), DX))
p_in(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U3(X, Y, DY, DX, p_in(d(e(X)), DX))
p_in(d(e(+(X, Y))), +(DX, DY)) → U1(X, Y, DX, DY, p_in(d(e(X)), DX))
p_in(d(e(const(A))), const(0)) → p_out(d(e(const(A))), const(0))
p_in(d(e(t)), const(1)) → p_out(d(e(t)), const(1))
U1(X, Y, DX, DY, p_out(d(e(X)), DX)) → U2(X, Y, DX, DY, p_in(d(e(Y)), DY))
U2(X, Y, DX, DY, p_out(d(e(Y)), DY)) → p_out(d(e(+(X, Y))), +(DX, DY))
U3(X, Y, DY, DX, p_out(d(e(X)), DX)) → U4(X, Y, DY, DX, p_in(d(e(Y)), DY))
U4(X, Y, DY, DX, p_out(d(e(Y)), DY)) → p_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U5(X, DDX, p_out(d(X), DX)) → U6(X, DDX, DX, p_in(d(e(DX)), DDX))
U6(X, DDX, DX, p_out(d(e(DX)), DDX)) → p_out(d(d(X)), DDX)

The argument filtering Pi contains the following mapping:
p_in(x1, x2)  =  p_in
d(x1)  =  d(x1)
U5(x1, x2, x3)  =  U5(x3)
e(x1)  =  e(x1)
*(x1, x2)  =  *(x1, x2)
+(x1, x2)  =  +(x1, x2)
U3(x1, x2, x3, x4, x5)  =  U3(x5)
U1(x1, x2, x3, x4, x5)  =  U1(x5)
const(x1)  =  const
0  =  0
p_out(x1, x2)  =  p_out(x1, x2)
t  =  t
1  =  1
U2(x1, x2, x3, x4, x5)  =  U2(x1, x3, x5)
U4(x1, x2, x3, x4, x5)  =  U4(x1, x4, x5)
U6(x1, x2, x3, x4)  =  U6(x1, x4)
P_IN(x1, x2)  =  P_IN
U51(x1, x2, x3)  =  U51(x3)
U41(x1, x2, x3, x4, x5)  =  U41(x1, x4, x5)
U31(x1, x2, x3, x4, x5)  =  U31(x5)
U21(x1, x2, x3, x4, x5)  =  U21(x1, x3, x5)
U11(x1, x2, x3, x4, x5)  =  U11(x5)
U61(x1, x2, x3, x4)  =  U61(x1, x4)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

P_IN(d(d(X)), DDX) → U51(X, DDX, p_in(d(X), DX))
P_IN(d(d(X)), DDX) → P_IN(d(X), DX)
P_IN(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U31(X, Y, DY, DX, p_in(d(e(X)), DX))
P_IN(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → P_IN(d(e(X)), DX)
P_IN(d(e(+(X, Y))), +(DX, DY)) → U11(X, Y, DX, DY, p_in(d(e(X)), DX))
P_IN(d(e(+(X, Y))), +(DX, DY)) → P_IN(d(e(X)), DX)
U11(X, Y, DX, DY, p_out(d(e(X)), DX)) → U21(X, Y, DX, DY, p_in(d(e(Y)), DY))
U11(X, Y, DX, DY, p_out(d(e(X)), DX)) → P_IN(d(e(Y)), DY)
U31(X, Y, DY, DX, p_out(d(e(X)), DX)) → U41(X, Y, DY, DX, p_in(d(e(Y)), DY))
U31(X, Y, DY, DX, p_out(d(e(X)), DX)) → P_IN(d(e(Y)), DY)
U51(X, DDX, p_out(d(X), DX)) → U61(X, DDX, DX, p_in(d(e(DX)), DDX))
U51(X, DDX, p_out(d(X), DX)) → P_IN(d(e(DX)), DDX)

The TRS R consists of the following rules:

p_in(d(d(X)), DDX) → U5(X, DDX, p_in(d(X), DX))
p_in(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U3(X, Y, DY, DX, p_in(d(e(X)), DX))
p_in(d(e(+(X, Y))), +(DX, DY)) → U1(X, Y, DX, DY, p_in(d(e(X)), DX))
p_in(d(e(const(A))), const(0)) → p_out(d(e(const(A))), const(0))
p_in(d(e(t)), const(1)) → p_out(d(e(t)), const(1))
U1(X, Y, DX, DY, p_out(d(e(X)), DX)) → U2(X, Y, DX, DY, p_in(d(e(Y)), DY))
U2(X, Y, DX, DY, p_out(d(e(Y)), DY)) → p_out(d(e(+(X, Y))), +(DX, DY))
U3(X, Y, DY, DX, p_out(d(e(X)), DX)) → U4(X, Y, DY, DX, p_in(d(e(Y)), DY))
U4(X, Y, DY, DX, p_out(d(e(Y)), DY)) → p_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U5(X, DDX, p_out(d(X), DX)) → U6(X, DDX, DX, p_in(d(e(DX)), DDX))
U6(X, DDX, DX, p_out(d(e(DX)), DDX)) → p_out(d(d(X)), DDX)

The argument filtering Pi contains the following mapping:
p_in(x1, x2)  =  p_in
d(x1)  =  d(x1)
U5(x1, x2, x3)  =  U5(x3)
e(x1)  =  e(x1)
*(x1, x2)  =  *(x1, x2)
+(x1, x2)  =  +(x1, x2)
U3(x1, x2, x3, x4, x5)  =  U3(x5)
U1(x1, x2, x3, x4, x5)  =  U1(x5)
const(x1)  =  const
0  =  0
p_out(x1, x2)  =  p_out(x1, x2)
t  =  t
1  =  1
U2(x1, x2, x3, x4, x5)  =  U2(x1, x3, x5)
U4(x1, x2, x3, x4, x5)  =  U4(x1, x4, x5)
U6(x1, x2, x3, x4)  =  U6(x1, x4)
P_IN(x1, x2)  =  P_IN
U51(x1, x2, x3)  =  U51(x3)
U41(x1, x2, x3, x4, x5)  =  U41(x1, x4, x5)
U31(x1, x2, x3, x4, x5)  =  U31(x5)
U21(x1, x2, x3, x4, x5)  =  U21(x1, x3, x5)
U11(x1, x2, x3, x4, x5)  =  U11(x5)
U61(x1, x2, x3, x4)  =  U61(x1, x4)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 2 SCCs with 5 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

P_IN(d(e(+(X, Y))), +(DX, DY)) → U11(X, Y, DX, DY, p_in(d(e(X)), DX))
U11(X, Y, DX, DY, p_out(d(e(X)), DX)) → P_IN(d(e(Y)), DY)
U31(X, Y, DY, DX, p_out(d(e(X)), DX)) → P_IN(d(e(Y)), DY)
P_IN(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U31(X, Y, DY, DX, p_in(d(e(X)), DX))
P_IN(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → P_IN(d(e(X)), DX)
P_IN(d(e(+(X, Y))), +(DX, DY)) → P_IN(d(e(X)), DX)

The TRS R consists of the following rules:

p_in(d(d(X)), DDX) → U5(X, DDX, p_in(d(X), DX))
p_in(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U3(X, Y, DY, DX, p_in(d(e(X)), DX))
p_in(d(e(+(X, Y))), +(DX, DY)) → U1(X, Y, DX, DY, p_in(d(e(X)), DX))
p_in(d(e(const(A))), const(0)) → p_out(d(e(const(A))), const(0))
p_in(d(e(t)), const(1)) → p_out(d(e(t)), const(1))
U1(X, Y, DX, DY, p_out(d(e(X)), DX)) → U2(X, Y, DX, DY, p_in(d(e(Y)), DY))
U2(X, Y, DX, DY, p_out(d(e(Y)), DY)) → p_out(d(e(+(X, Y))), +(DX, DY))
U3(X, Y, DY, DX, p_out(d(e(X)), DX)) → U4(X, Y, DY, DX, p_in(d(e(Y)), DY))
U4(X, Y, DY, DX, p_out(d(e(Y)), DY)) → p_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U5(X, DDX, p_out(d(X), DX)) → U6(X, DDX, DX, p_in(d(e(DX)), DDX))
U6(X, DDX, DX, p_out(d(e(DX)), DDX)) → p_out(d(d(X)), DDX)

The argument filtering Pi contains the following mapping:
p_in(x1, x2)  =  p_in
d(x1)  =  d(x1)
U5(x1, x2, x3)  =  U5(x3)
e(x1)  =  e(x1)
*(x1, x2)  =  *(x1, x2)
+(x1, x2)  =  +(x1, x2)
U3(x1, x2, x3, x4, x5)  =  U3(x5)
U1(x1, x2, x3, x4, x5)  =  U1(x5)
const(x1)  =  const
0  =  0
p_out(x1, x2)  =  p_out(x1, x2)
t  =  t
1  =  1
U2(x1, x2, x3, x4, x5)  =  U2(x1, x3, x5)
U4(x1, x2, x3, x4, x5)  =  U4(x1, x4, x5)
U6(x1, x2, x3, x4)  =  U6(x1, x4)
P_IN(x1, x2)  =  P_IN
U31(x1, x2, x3, x4, x5)  =  U31(x5)
U11(x1, x2, x3, x4, x5)  =  U11(x5)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

P_IN(d(e(+(X, Y))), +(DX, DY)) → U11(X, Y, DX, DY, p_in(d(e(X)), DX))
U11(X, Y, DX, DY, p_out(d(e(X)), DX)) → P_IN(d(e(Y)), DY)
U31(X, Y, DY, DX, p_out(d(e(X)), DX)) → P_IN(d(e(Y)), DY)
P_IN(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U31(X, Y, DY, DX, p_in(d(e(X)), DX))
P_IN(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → P_IN(d(e(X)), DX)
P_IN(d(e(+(X, Y))), +(DX, DY)) → P_IN(d(e(X)), DX)

The TRS R consists of the following rules:

p_in(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U3(X, Y, DY, DX, p_in(d(e(X)), DX))
p_in(d(e(+(X, Y))), +(DX, DY)) → U1(X, Y, DX, DY, p_in(d(e(X)), DX))
p_in(d(e(const(A))), const(0)) → p_out(d(e(const(A))), const(0))
p_in(d(e(t)), const(1)) → p_out(d(e(t)), const(1))
U3(X, Y, DY, DX, p_out(d(e(X)), DX)) → U4(X, Y, DY, DX, p_in(d(e(Y)), DY))
U1(X, Y, DX, DY, p_out(d(e(X)), DX)) → U2(X, Y, DX, DY, p_in(d(e(Y)), DY))
U4(X, Y, DY, DX, p_out(d(e(Y)), DY)) → p_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U2(X, Y, DX, DY, p_out(d(e(Y)), DY)) → p_out(d(e(+(X, Y))), +(DX, DY))

The argument filtering Pi contains the following mapping:
p_in(x1, x2)  =  p_in
d(x1)  =  d(x1)
e(x1)  =  e(x1)
*(x1, x2)  =  *(x1, x2)
+(x1, x2)  =  +(x1, x2)
U3(x1, x2, x3, x4, x5)  =  U3(x5)
U1(x1, x2, x3, x4, x5)  =  U1(x5)
const(x1)  =  const
0  =  0
p_out(x1, x2)  =  p_out(x1, x2)
t  =  t
1  =  1
U2(x1, x2, x3, x4, x5)  =  U2(x1, x3, x5)
U4(x1, x2, x3, x4, x5)  =  U4(x1, x4, x5)
P_IN(x1, x2)  =  P_IN
U31(x1, x2, x3, x4, x5)  =  U31(x5)
U11(x1, x2, x3, x4, x5)  =  U11(x5)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ Narrowing
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

P_INU11(p_in)
P_INP_IN
U31(p_out(d(e(X)), DX)) → P_IN
P_INU31(p_in)
U11(p_out(d(e(X)), DX)) → P_IN

The TRS R consists of the following rules:

p_inU3(p_in)
p_inU1(p_in)
p_inp_out(d(e(const)), const)
p_inp_out(d(e(t)), const)
U3(p_out(d(e(X)), DX)) → U4(X, DX, p_in)
U1(p_out(d(e(X)), DX)) → U2(X, DX, p_in)
U4(X, DX, p_out(d(e(Y)), DY)) → p_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U2(X, DX, p_out(d(e(Y)), DY)) → p_out(d(e(+(X, Y))), +(DX, DY))

The set Q consists of the following terms:

p_in
U3(x0)
U1(x0)
U4(x0, x1, x2)
U2(x0, x1, x2)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule P_INU11(p_in) at position [0] we obtained the following new rules:

P_INU11(U3(p_in))
P_INU11(p_out(d(e(const)), const))
P_INU11(U1(p_in))
P_INU11(p_out(d(e(t)), const))



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
QDP
                            ↳ Narrowing
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

P_INU11(p_out(d(e(t)), const))
P_INU11(U3(p_in))
P_INU11(U1(p_in))
P_INU11(p_out(d(e(const)), const))
U31(p_out(d(e(X)), DX)) → P_IN
P_INP_IN
U11(p_out(d(e(X)), DX)) → P_IN
P_INU31(p_in)

The TRS R consists of the following rules:

p_inU3(p_in)
p_inU1(p_in)
p_inp_out(d(e(const)), const)
p_inp_out(d(e(t)), const)
U3(p_out(d(e(X)), DX)) → U4(X, DX, p_in)
U1(p_out(d(e(X)), DX)) → U2(X, DX, p_in)
U4(X, DX, p_out(d(e(Y)), DY)) → p_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U2(X, DX, p_out(d(e(Y)), DY)) → p_out(d(e(+(X, Y))), +(DX, DY))

The set Q consists of the following terms:

p_in
U3(x0)
U1(x0)
U4(x0, x1, x2)
U2(x0, x1, x2)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule P_INU31(p_in) at position [0] we obtained the following new rules:

P_INU31(p_out(d(e(t)), const))
P_INU31(p_out(d(e(const)), const))
P_INU31(U3(p_in))
P_INU31(U1(p_in))



↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
QDP
                                ↳ NonTerminationProof
              ↳ PiDP
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

P_INU31(p_out(d(e(const)), const))
P_INU31(U1(p_in))
P_INU11(p_out(d(e(t)), const))
P_INU11(U3(p_in))
P_INU31(p_out(d(e(t)), const))
P_INU11(p_out(d(e(const)), const))
P_INU11(U1(p_in))
P_INP_IN
U31(p_out(d(e(X)), DX)) → P_IN
P_INU31(U3(p_in))
U11(p_out(d(e(X)), DX)) → P_IN

The TRS R consists of the following rules:

p_inU3(p_in)
p_inU1(p_in)
p_inp_out(d(e(const)), const)
p_inp_out(d(e(t)), const)
U3(p_out(d(e(X)), DX)) → U4(X, DX, p_in)
U1(p_out(d(e(X)), DX)) → U2(X, DX, p_in)
U4(X, DX, p_out(d(e(Y)), DY)) → p_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U2(X, DX, p_out(d(e(Y)), DY)) → p_out(d(e(+(X, Y))), +(DX, DY))

The set Q consists of the following terms:

p_in
U3(x0)
U1(x0)
U4(x0, x1, x2)
U2(x0, x1, x2)

We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

P_INU31(p_out(d(e(const)), const))
P_INU31(U1(p_in))
P_INU11(p_out(d(e(t)), const))
P_INU11(U3(p_in))
P_INU31(p_out(d(e(t)), const))
P_INU11(p_out(d(e(const)), const))
P_INU11(U1(p_in))
P_INP_IN
U31(p_out(d(e(X)), DX)) → P_IN
P_INU31(U3(p_in))
U11(p_out(d(e(X)), DX)) → P_IN

The TRS R consists of the following rules:

p_inU3(p_in)
p_inU1(p_in)
p_inp_out(d(e(const)), const)
p_inp_out(d(e(t)), const)
U3(p_out(d(e(X)), DX)) → U4(X, DX, p_in)
U1(p_out(d(e(X)), DX)) → U2(X, DX, p_in)
U4(X, DX, p_out(d(e(Y)), DY)) → p_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U2(X, DX, p_out(d(e(Y)), DY)) → p_out(d(e(+(X, Y))), +(DX, DY))


s = P_IN evaluates to t =P_IN

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from P_IN to P_IN.





↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

P_IN(d(d(X)), DDX) → P_IN(d(X), DX)

The TRS R consists of the following rules:

p_in(d(d(X)), DDX) → U5(X, DDX, p_in(d(X), DX))
p_in(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U3(X, Y, DY, DX, p_in(d(e(X)), DX))
p_in(d(e(+(X, Y))), +(DX, DY)) → U1(X, Y, DX, DY, p_in(d(e(X)), DX))
p_in(d(e(const(A))), const(0)) → p_out(d(e(const(A))), const(0))
p_in(d(e(t)), const(1)) → p_out(d(e(t)), const(1))
U1(X, Y, DX, DY, p_out(d(e(X)), DX)) → U2(X, Y, DX, DY, p_in(d(e(Y)), DY))
U2(X, Y, DX, DY, p_out(d(e(Y)), DY)) → p_out(d(e(+(X, Y))), +(DX, DY))
U3(X, Y, DY, DX, p_out(d(e(X)), DX)) → U4(X, Y, DY, DX, p_in(d(e(Y)), DY))
U4(X, Y, DY, DX, p_out(d(e(Y)), DY)) → p_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U5(X, DDX, p_out(d(X), DX)) → U6(X, DDX, DX, p_in(d(e(DX)), DDX))
U6(X, DDX, DX, p_out(d(e(DX)), DDX)) → p_out(d(d(X)), DDX)

The argument filtering Pi contains the following mapping:
p_in(x1, x2)  =  p_in
d(x1)  =  d(x1)
U5(x1, x2, x3)  =  U5(x3)
e(x1)  =  e(x1)
*(x1, x2)  =  *(x1, x2)
+(x1, x2)  =  +(x1, x2)
U3(x1, x2, x3, x4, x5)  =  U3(x5)
U1(x1, x2, x3, x4, x5)  =  U1(x5)
const(x1)  =  const
0  =  0
p_out(x1, x2)  =  p_out(x1, x2)
t  =  t
1  =  1
U2(x1, x2, x3, x4, x5)  =  U2(x1, x3, x5)
U4(x1, x2, x3, x4, x5)  =  U4(x1, x4, x5)
U6(x1, x2, x3, x4)  =  U6(x1, x4)
P_IN(x1, x2)  =  P_IN

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
  ↳ PrologToPiTRSProof

Pi DP problem:
The TRS P consists of the following rules:

P_IN(d(d(X)), DDX) → P_IN(d(X), DX)

R is empty.
The argument filtering Pi contains the following mapping:
d(x1)  =  d(x1)
P_IN(x1, x2)  =  P_IN

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof
  ↳ PrologToPiTRSProof

Q DP problem:
The TRS P consists of the following rules:

P_INP_IN

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

P_INP_IN

The TRS R consists of the following rules:none


s = P_IN evaluates to t =P_IN

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from P_IN to P_IN.




We use the technique of [30].Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

p_in(d(d(X)), DDX) → U5(X, DDX, p_in(d(X), DX))
p_in(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U3(X, Y, DY, DX, p_in(d(e(X)), DX))
p_in(d(e(+(X, Y))), +(DX, DY)) → U1(X, Y, DX, DY, p_in(d(e(X)), DX))
p_in(d(e(const(A))), const(0)) → p_out(d(e(const(A))), const(0))
p_in(d(e(t)), const(1)) → p_out(d(e(t)), const(1))
U1(X, Y, DX, DY, p_out(d(e(X)), DX)) → U2(X, Y, DX, DY, p_in(d(e(Y)), DY))
U2(X, Y, DX, DY, p_out(d(e(Y)), DY)) → p_out(d(e(+(X, Y))), +(DX, DY))
U3(X, Y, DY, DX, p_out(d(e(X)), DX)) → U4(X, Y, DY, DX, p_in(d(e(Y)), DY))
U4(X, Y, DY, DX, p_out(d(e(Y)), DY)) → p_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U5(X, DDX, p_out(d(X), DX)) → U6(X, DDX, DX, p_in(d(e(DX)), DDX))
U6(X, DDX, DX, p_out(d(e(DX)), DDX)) → p_out(d(d(X)), DDX)

The argument filtering Pi contains the following mapping:
p_in(x1, x2)  =  p_in
d(x1)  =  d(x1)
U5(x1, x2, x3)  =  U5(x3)
e(x1)  =  e(x1)
*(x1, x2)  =  *(x1, x2)
+(x1, x2)  =  +(x1, x2)
U3(x1, x2, x3, x4, x5)  =  U3(x5)
U1(x1, x2, x3, x4, x5)  =  U1(x5)
const(x1)  =  const
0  =  0
p_out(x1, x2)  =  p_out(x1, x2)
t  =  t
1  =  1
U2(x1, x2, x3, x4, x5)  =  U2(x1, x3, x5)
U4(x1, x2, x3, x4, x5)  =  U4(x1, x4, x5)
U6(x1, x2, x3, x4)  =  U6(x1, x4)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
PiTRS
      ↳ DependencyPairsProof

Pi-finite rewrite system:
The TRS R consists of the following rules:

p_in(d(d(X)), DDX) → U5(X, DDX, p_in(d(X), DX))
p_in(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U3(X, Y, DY, DX, p_in(d(e(X)), DX))
p_in(d(e(+(X, Y))), +(DX, DY)) → U1(X, Y, DX, DY, p_in(d(e(X)), DX))
p_in(d(e(const(A))), const(0)) → p_out(d(e(const(A))), const(0))
p_in(d(e(t)), const(1)) → p_out(d(e(t)), const(1))
U1(X, Y, DX, DY, p_out(d(e(X)), DX)) → U2(X, Y, DX, DY, p_in(d(e(Y)), DY))
U2(X, Y, DX, DY, p_out(d(e(Y)), DY)) → p_out(d(e(+(X, Y))), +(DX, DY))
U3(X, Y, DY, DX, p_out(d(e(X)), DX)) → U4(X, Y, DY, DX, p_in(d(e(Y)), DY))
U4(X, Y, DY, DX, p_out(d(e(Y)), DY)) → p_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U5(X, DDX, p_out(d(X), DX)) → U6(X, DDX, DX, p_in(d(e(DX)), DDX))
U6(X, DDX, DX, p_out(d(e(DX)), DDX)) → p_out(d(d(X)), DDX)

The argument filtering Pi contains the following mapping:
p_in(x1, x2)  =  p_in
d(x1)  =  d(x1)
U5(x1, x2, x3)  =  U5(x3)
e(x1)  =  e(x1)
*(x1, x2)  =  *(x1, x2)
+(x1, x2)  =  +(x1, x2)
U3(x1, x2, x3, x4, x5)  =  U3(x5)
U1(x1, x2, x3, x4, x5)  =  U1(x5)
const(x1)  =  const
0  =  0
p_out(x1, x2)  =  p_out(x1, x2)
t  =  t
1  =  1
U2(x1, x2, x3, x4, x5)  =  U2(x1, x3, x5)
U4(x1, x2, x3, x4, x5)  =  U4(x1, x4, x5)
U6(x1, x2, x3, x4)  =  U6(x1, x4)


Using Dependency Pairs [1,30] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

P_IN(d(d(X)), DDX) → U51(X, DDX, p_in(d(X), DX))
P_IN(d(d(X)), DDX) → P_IN(d(X), DX)
P_IN(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U31(X, Y, DY, DX, p_in(d(e(X)), DX))
P_IN(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → P_IN(d(e(X)), DX)
P_IN(d(e(+(X, Y))), +(DX, DY)) → U11(X, Y, DX, DY, p_in(d(e(X)), DX))
P_IN(d(e(+(X, Y))), +(DX, DY)) → P_IN(d(e(X)), DX)
U11(X, Y, DX, DY, p_out(d(e(X)), DX)) → U21(X, Y, DX, DY, p_in(d(e(Y)), DY))
U11(X, Y, DX, DY, p_out(d(e(X)), DX)) → P_IN(d(e(Y)), DY)
U31(X, Y, DY, DX, p_out(d(e(X)), DX)) → U41(X, Y, DY, DX, p_in(d(e(Y)), DY))
U31(X, Y, DY, DX, p_out(d(e(X)), DX)) → P_IN(d(e(Y)), DY)
U51(X, DDX, p_out(d(X), DX)) → U61(X, DDX, DX, p_in(d(e(DX)), DDX))
U51(X, DDX, p_out(d(X), DX)) → P_IN(d(e(DX)), DDX)

The TRS R consists of the following rules:

p_in(d(d(X)), DDX) → U5(X, DDX, p_in(d(X), DX))
p_in(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U3(X, Y, DY, DX, p_in(d(e(X)), DX))
p_in(d(e(+(X, Y))), +(DX, DY)) → U1(X, Y, DX, DY, p_in(d(e(X)), DX))
p_in(d(e(const(A))), const(0)) → p_out(d(e(const(A))), const(0))
p_in(d(e(t)), const(1)) → p_out(d(e(t)), const(1))
U1(X, Y, DX, DY, p_out(d(e(X)), DX)) → U2(X, Y, DX, DY, p_in(d(e(Y)), DY))
U2(X, Y, DX, DY, p_out(d(e(Y)), DY)) → p_out(d(e(+(X, Y))), +(DX, DY))
U3(X, Y, DY, DX, p_out(d(e(X)), DX)) → U4(X, Y, DY, DX, p_in(d(e(Y)), DY))
U4(X, Y, DY, DX, p_out(d(e(Y)), DY)) → p_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U5(X, DDX, p_out(d(X), DX)) → U6(X, DDX, DX, p_in(d(e(DX)), DDX))
U6(X, DDX, DX, p_out(d(e(DX)), DDX)) → p_out(d(d(X)), DDX)

The argument filtering Pi contains the following mapping:
p_in(x1, x2)  =  p_in
d(x1)  =  d(x1)
U5(x1, x2, x3)  =  U5(x3)
e(x1)  =  e(x1)
*(x1, x2)  =  *(x1, x2)
+(x1, x2)  =  +(x1, x2)
U3(x1, x2, x3, x4, x5)  =  U3(x5)
U1(x1, x2, x3, x4, x5)  =  U1(x5)
const(x1)  =  const
0  =  0
p_out(x1, x2)  =  p_out(x1, x2)
t  =  t
1  =  1
U2(x1, x2, x3, x4, x5)  =  U2(x1, x3, x5)
U4(x1, x2, x3, x4, x5)  =  U4(x1, x4, x5)
U6(x1, x2, x3, x4)  =  U6(x1, x4)
P_IN(x1, x2)  =  P_IN
U51(x1, x2, x3)  =  U51(x3)
U41(x1, x2, x3, x4, x5)  =  U41(x1, x4, x5)
U31(x1, x2, x3, x4, x5)  =  U31(x5)
U21(x1, x2, x3, x4, x5)  =  U21(x1, x3, x5)
U11(x1, x2, x3, x4, x5)  =  U11(x5)
U61(x1, x2, x3, x4)  =  U61(x1, x4)

We have to consider all (P,R,Pi)-chains

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
PiDP
          ↳ DependencyGraphProof

Pi DP problem:
The TRS P consists of the following rules:

P_IN(d(d(X)), DDX) → U51(X, DDX, p_in(d(X), DX))
P_IN(d(d(X)), DDX) → P_IN(d(X), DX)
P_IN(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U31(X, Y, DY, DX, p_in(d(e(X)), DX))
P_IN(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → P_IN(d(e(X)), DX)
P_IN(d(e(+(X, Y))), +(DX, DY)) → U11(X, Y, DX, DY, p_in(d(e(X)), DX))
P_IN(d(e(+(X, Y))), +(DX, DY)) → P_IN(d(e(X)), DX)
U11(X, Y, DX, DY, p_out(d(e(X)), DX)) → U21(X, Y, DX, DY, p_in(d(e(Y)), DY))
U11(X, Y, DX, DY, p_out(d(e(X)), DX)) → P_IN(d(e(Y)), DY)
U31(X, Y, DY, DX, p_out(d(e(X)), DX)) → U41(X, Y, DY, DX, p_in(d(e(Y)), DY))
U31(X, Y, DY, DX, p_out(d(e(X)), DX)) → P_IN(d(e(Y)), DY)
U51(X, DDX, p_out(d(X), DX)) → U61(X, DDX, DX, p_in(d(e(DX)), DDX))
U51(X, DDX, p_out(d(X), DX)) → P_IN(d(e(DX)), DDX)

The TRS R consists of the following rules:

p_in(d(d(X)), DDX) → U5(X, DDX, p_in(d(X), DX))
p_in(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U3(X, Y, DY, DX, p_in(d(e(X)), DX))
p_in(d(e(+(X, Y))), +(DX, DY)) → U1(X, Y, DX, DY, p_in(d(e(X)), DX))
p_in(d(e(const(A))), const(0)) → p_out(d(e(const(A))), const(0))
p_in(d(e(t)), const(1)) → p_out(d(e(t)), const(1))
U1(X, Y, DX, DY, p_out(d(e(X)), DX)) → U2(X, Y, DX, DY, p_in(d(e(Y)), DY))
U2(X, Y, DX, DY, p_out(d(e(Y)), DY)) → p_out(d(e(+(X, Y))), +(DX, DY))
U3(X, Y, DY, DX, p_out(d(e(X)), DX)) → U4(X, Y, DY, DX, p_in(d(e(Y)), DY))
U4(X, Y, DY, DX, p_out(d(e(Y)), DY)) → p_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U5(X, DDX, p_out(d(X), DX)) → U6(X, DDX, DX, p_in(d(e(DX)), DDX))
U6(X, DDX, DX, p_out(d(e(DX)), DDX)) → p_out(d(d(X)), DDX)

The argument filtering Pi contains the following mapping:
p_in(x1, x2)  =  p_in
d(x1)  =  d(x1)
U5(x1, x2, x3)  =  U5(x3)
e(x1)  =  e(x1)
*(x1, x2)  =  *(x1, x2)
+(x1, x2)  =  +(x1, x2)
U3(x1, x2, x3, x4, x5)  =  U3(x5)
U1(x1, x2, x3, x4, x5)  =  U1(x5)
const(x1)  =  const
0  =  0
p_out(x1, x2)  =  p_out(x1, x2)
t  =  t
1  =  1
U2(x1, x2, x3, x4, x5)  =  U2(x1, x3, x5)
U4(x1, x2, x3, x4, x5)  =  U4(x1, x4, x5)
U6(x1, x2, x3, x4)  =  U6(x1, x4)
P_IN(x1, x2)  =  P_IN
U51(x1, x2, x3)  =  U51(x3)
U41(x1, x2, x3, x4, x5)  =  U41(x1, x4, x5)
U31(x1, x2, x3, x4, x5)  =  U31(x5)
U21(x1, x2, x3, x4, x5)  =  U21(x1, x3, x5)
U11(x1, x2, x3, x4, x5)  =  U11(x5)
U61(x1, x2, x3, x4)  =  U61(x1, x4)

We have to consider all (P,R,Pi)-chains
The approximation of the Dependency Graph [30] contains 2 SCCs with 5 less nodes.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
PiDP
                ↳ UsableRulesProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

P_IN(d(e(+(X, Y))), +(DX, DY)) → U11(X, Y, DX, DY, p_in(d(e(X)), DX))
U11(X, Y, DX, DY, p_out(d(e(X)), DX)) → P_IN(d(e(Y)), DY)
U31(X, Y, DY, DX, p_out(d(e(X)), DX)) → P_IN(d(e(Y)), DY)
P_IN(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U31(X, Y, DY, DX, p_in(d(e(X)), DX))
P_IN(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → P_IN(d(e(X)), DX)
P_IN(d(e(+(X, Y))), +(DX, DY)) → P_IN(d(e(X)), DX)

The TRS R consists of the following rules:

p_in(d(d(X)), DDX) → U5(X, DDX, p_in(d(X), DX))
p_in(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U3(X, Y, DY, DX, p_in(d(e(X)), DX))
p_in(d(e(+(X, Y))), +(DX, DY)) → U1(X, Y, DX, DY, p_in(d(e(X)), DX))
p_in(d(e(const(A))), const(0)) → p_out(d(e(const(A))), const(0))
p_in(d(e(t)), const(1)) → p_out(d(e(t)), const(1))
U1(X, Y, DX, DY, p_out(d(e(X)), DX)) → U2(X, Y, DX, DY, p_in(d(e(Y)), DY))
U2(X, Y, DX, DY, p_out(d(e(Y)), DY)) → p_out(d(e(+(X, Y))), +(DX, DY))
U3(X, Y, DY, DX, p_out(d(e(X)), DX)) → U4(X, Y, DY, DX, p_in(d(e(Y)), DY))
U4(X, Y, DY, DX, p_out(d(e(Y)), DY)) → p_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U5(X, DDX, p_out(d(X), DX)) → U6(X, DDX, DX, p_in(d(e(DX)), DDX))
U6(X, DDX, DX, p_out(d(e(DX)), DDX)) → p_out(d(d(X)), DDX)

The argument filtering Pi contains the following mapping:
p_in(x1, x2)  =  p_in
d(x1)  =  d(x1)
U5(x1, x2, x3)  =  U5(x3)
e(x1)  =  e(x1)
*(x1, x2)  =  *(x1, x2)
+(x1, x2)  =  +(x1, x2)
U3(x1, x2, x3, x4, x5)  =  U3(x5)
U1(x1, x2, x3, x4, x5)  =  U1(x5)
const(x1)  =  const
0  =  0
p_out(x1, x2)  =  p_out(x1, x2)
t  =  t
1  =  1
U2(x1, x2, x3, x4, x5)  =  U2(x1, x3, x5)
U4(x1, x2, x3, x4, x5)  =  U4(x1, x4, x5)
U6(x1, x2, x3, x4)  =  U6(x1, x4)
P_IN(x1, x2)  =  P_IN
U31(x1, x2, x3, x4, x5)  =  U31(x5)
U11(x1, x2, x3, x4, x5)  =  U11(x5)

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof
              ↳ PiDP

Pi DP problem:
The TRS P consists of the following rules:

P_IN(d(e(+(X, Y))), +(DX, DY)) → U11(X, Y, DX, DY, p_in(d(e(X)), DX))
U11(X, Y, DX, DY, p_out(d(e(X)), DX)) → P_IN(d(e(Y)), DY)
U31(X, Y, DY, DX, p_out(d(e(X)), DX)) → P_IN(d(e(Y)), DY)
P_IN(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U31(X, Y, DY, DX, p_in(d(e(X)), DX))
P_IN(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → P_IN(d(e(X)), DX)
P_IN(d(e(+(X, Y))), +(DX, DY)) → P_IN(d(e(X)), DX)

The TRS R consists of the following rules:

p_in(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U3(X, Y, DY, DX, p_in(d(e(X)), DX))
p_in(d(e(+(X, Y))), +(DX, DY)) → U1(X, Y, DX, DY, p_in(d(e(X)), DX))
p_in(d(e(const(A))), const(0)) → p_out(d(e(const(A))), const(0))
p_in(d(e(t)), const(1)) → p_out(d(e(t)), const(1))
U3(X, Y, DY, DX, p_out(d(e(X)), DX)) → U4(X, Y, DY, DX, p_in(d(e(Y)), DY))
U1(X, Y, DX, DY, p_out(d(e(X)), DX)) → U2(X, Y, DX, DY, p_in(d(e(Y)), DY))
U4(X, Y, DY, DX, p_out(d(e(Y)), DY)) → p_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U2(X, Y, DX, DY, p_out(d(e(Y)), DY)) → p_out(d(e(+(X, Y))), +(DX, DY))

The argument filtering Pi contains the following mapping:
p_in(x1, x2)  =  p_in
d(x1)  =  d(x1)
e(x1)  =  e(x1)
*(x1, x2)  =  *(x1, x2)
+(x1, x2)  =  +(x1, x2)
U3(x1, x2, x3, x4, x5)  =  U3(x5)
U1(x1, x2, x3, x4, x5)  =  U1(x5)
const(x1)  =  const
0  =  0
p_out(x1, x2)  =  p_out(x1, x2)
t  =  t
1  =  1
U2(x1, x2, x3, x4, x5)  =  U2(x1, x3, x5)
U4(x1, x2, x3, x4, x5)  =  U4(x1, x4, x5)
P_IN(x1, x2)  =  P_IN
U31(x1, x2, x3, x4, x5)  =  U31(x5)
U11(x1, x2, x3, x4, x5)  =  U11(x5)

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ Narrowing
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

P_INU11(p_in)
P_INP_IN
U31(p_out(d(e(X)), DX)) → P_IN
P_INU31(p_in)
U11(p_out(d(e(X)), DX)) → P_IN

The TRS R consists of the following rules:

p_inU3(p_in)
p_inU1(p_in)
p_inp_out(d(e(const)), const)
p_inp_out(d(e(t)), const)
U3(p_out(d(e(X)), DX)) → U4(X, DX, p_in)
U1(p_out(d(e(X)), DX)) → U2(X, DX, p_in)
U4(X, DX, p_out(d(e(Y)), DY)) → p_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U2(X, DX, p_out(d(e(Y)), DY)) → p_out(d(e(+(X, Y))), +(DX, DY))

The set Q consists of the following terms:

p_in
U3(x0)
U1(x0)
U4(x0, x1, x2)
U2(x0, x1, x2)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule P_INU11(p_in) at position [0] we obtained the following new rules:

P_INU11(U3(p_in))
P_INU11(p_out(d(e(const)), const))
P_INU11(U1(p_in))
P_INU11(p_out(d(e(t)), const))



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
QDP
                            ↳ Narrowing
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

P_INU11(p_out(d(e(t)), const))
P_INU11(U3(p_in))
P_INU11(U1(p_in))
P_INU11(p_out(d(e(const)), const))
U31(p_out(d(e(X)), DX)) → P_IN
P_INP_IN
U11(p_out(d(e(X)), DX)) → P_IN
P_INU31(p_in)

The TRS R consists of the following rules:

p_inU3(p_in)
p_inU1(p_in)
p_inp_out(d(e(const)), const)
p_inp_out(d(e(t)), const)
U3(p_out(d(e(X)), DX)) → U4(X, DX, p_in)
U1(p_out(d(e(X)), DX)) → U2(X, DX, p_in)
U4(X, DX, p_out(d(e(Y)), DY)) → p_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U2(X, DX, p_out(d(e(Y)), DY)) → p_out(d(e(+(X, Y))), +(DX, DY))

The set Q consists of the following terms:

p_in
U3(x0)
U1(x0)
U4(x0, x1, x2)
U2(x0, x1, x2)

We have to consider all (P,Q,R)-chains.
By narrowing [15] the rule P_INU31(p_in) at position [0] we obtained the following new rules:

P_INU31(p_out(d(e(t)), const))
P_INU31(p_out(d(e(const)), const))
P_INU31(U3(p_in))
P_INU31(U1(p_in))



↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
QDP
                                ↳ NonTerminationProof
              ↳ PiDP

Q DP problem:
The TRS P consists of the following rules:

P_INU31(p_out(d(e(const)), const))
P_INU31(U1(p_in))
P_INU11(p_out(d(e(t)), const))
P_INU11(U3(p_in))
P_INU31(p_out(d(e(t)), const))
P_INU11(p_out(d(e(const)), const))
P_INU11(U1(p_in))
P_INP_IN
U31(p_out(d(e(X)), DX)) → P_IN
P_INU31(U3(p_in))
U11(p_out(d(e(X)), DX)) → P_IN

The TRS R consists of the following rules:

p_inU3(p_in)
p_inU1(p_in)
p_inp_out(d(e(const)), const)
p_inp_out(d(e(t)), const)
U3(p_out(d(e(X)), DX)) → U4(X, DX, p_in)
U1(p_out(d(e(X)), DX)) → U2(X, DX, p_in)
U4(X, DX, p_out(d(e(Y)), DY)) → p_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U2(X, DX, p_out(d(e(Y)), DY)) → p_out(d(e(+(X, Y))), +(DX, DY))

The set Q consists of the following terms:

p_in
U3(x0)
U1(x0)
U4(x0, x1, x2)
U2(x0, x1, x2)

We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

P_INU31(p_out(d(e(const)), const))
P_INU31(U1(p_in))
P_INU11(p_out(d(e(t)), const))
P_INU11(U3(p_in))
P_INU31(p_out(d(e(t)), const))
P_INU11(p_out(d(e(const)), const))
P_INU11(U1(p_in))
P_INP_IN
U31(p_out(d(e(X)), DX)) → P_IN
P_INU31(U3(p_in))
U11(p_out(d(e(X)), DX)) → P_IN

The TRS R consists of the following rules:

p_inU3(p_in)
p_inU1(p_in)
p_inp_out(d(e(const)), const)
p_inp_out(d(e(t)), const)
U3(p_out(d(e(X)), DX)) → U4(X, DX, p_in)
U1(p_out(d(e(X)), DX)) → U2(X, DX, p_in)
U4(X, DX, p_out(d(e(Y)), DY)) → p_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U2(X, DX, p_out(d(e(Y)), DY)) → p_out(d(e(+(X, Y))), +(DX, DY))


s = P_IN evaluates to t =P_IN

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from P_IN to P_IN.





↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
PiDP
                ↳ UsableRulesProof

Pi DP problem:
The TRS P consists of the following rules:

P_IN(d(d(X)), DDX) → P_IN(d(X), DX)

The TRS R consists of the following rules:

p_in(d(d(X)), DDX) → U5(X, DDX, p_in(d(X), DX))
p_in(d(e(*(X, Y))), +(*(X, DY), *(Y, DX))) → U3(X, Y, DY, DX, p_in(d(e(X)), DX))
p_in(d(e(+(X, Y))), +(DX, DY)) → U1(X, Y, DX, DY, p_in(d(e(X)), DX))
p_in(d(e(const(A))), const(0)) → p_out(d(e(const(A))), const(0))
p_in(d(e(t)), const(1)) → p_out(d(e(t)), const(1))
U1(X, Y, DX, DY, p_out(d(e(X)), DX)) → U2(X, Y, DX, DY, p_in(d(e(Y)), DY))
U2(X, Y, DX, DY, p_out(d(e(Y)), DY)) → p_out(d(e(+(X, Y))), +(DX, DY))
U3(X, Y, DY, DX, p_out(d(e(X)), DX)) → U4(X, Y, DY, DX, p_in(d(e(Y)), DY))
U4(X, Y, DY, DX, p_out(d(e(Y)), DY)) → p_out(d(e(*(X, Y))), +(*(X, DY), *(Y, DX)))
U5(X, DDX, p_out(d(X), DX)) → U6(X, DDX, DX, p_in(d(e(DX)), DDX))
U6(X, DDX, DX, p_out(d(e(DX)), DDX)) → p_out(d(d(X)), DDX)

The argument filtering Pi contains the following mapping:
p_in(x1, x2)  =  p_in
d(x1)  =  d(x1)
U5(x1, x2, x3)  =  U5(x3)
e(x1)  =  e(x1)
*(x1, x2)  =  *(x1, x2)
+(x1, x2)  =  +(x1, x2)
U3(x1, x2, x3, x4, x5)  =  U3(x5)
U1(x1, x2, x3, x4, x5)  =  U1(x5)
const(x1)  =  const
0  =  0
p_out(x1, x2)  =  p_out(x1, x2)
t  =  t
1  =  1
U2(x1, x2, x3, x4, x5)  =  U2(x1, x3, x5)
U4(x1, x2, x3, x4, x5)  =  U4(x1, x4, x5)
U6(x1, x2, x3, x4)  =  U6(x1, x4)
P_IN(x1, x2)  =  P_IN

We have to consider all (P,R,Pi)-chains
For (infinitary) constructor rewriting [30] we can delete all non-usable rules from R.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
PiDP
                    ↳ PiDPToQDPProof

Pi DP problem:
The TRS P consists of the following rules:

P_IN(d(d(X)), DDX) → P_IN(d(X), DX)

R is empty.
The argument filtering Pi contains the following mapping:
d(x1)  =  d(x1)
P_IN(x1, x2)  =  P_IN

We have to consider all (P,R,Pi)-chains
Transforming (infinitary) constructor rewriting Pi-DP problem [30] into ordinary QDP problem [15] by application of Pi.

↳ Prolog
  ↳ PrologToPiTRSProof
  ↳ PrologToPiTRSProof
    ↳ PiTRS
      ↳ DependencyPairsProof
        ↳ PiDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ PiDP
              ↳ PiDP
                ↳ UsableRulesProof
                  ↳ PiDP
                    ↳ PiDPToQDPProof
QDP
                        ↳ NonTerminationProof

Q DP problem:
The TRS P consists of the following rules:

P_INP_IN

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.
We used the non-termination processor [17] to show that the DP problem is infinite.
Found a loop by semiunifying a rule from P directly.

The TRS P consists of the following rules:

P_INP_IN

The TRS R consists of the following rules:none


s = P_IN evaluates to t =P_IN

Thus s starts an infinite chain as s semiunifies with t with the following substitutions:




Rewriting sequence

The DP semiunifies directly so there is only one rewrite step from P_IN to P_IN.